<?php

final class Models_Core_Users_Record extends Core_Data_GenericRecord {

    private $intKey;
    private $strEmail;
    private $strEmailUpdate;

    function __construct ( $Model = null, $intKey = null ) {
        $this->Model = $Model;
        $this->intKey = $this->intKey;
    }

    /**
     * Gets the unique key for the record from the field 'Key'.
     *
     * @return integer
     */
    public function getKey () {
        return $this->getKey;
    }

    public function getEmail () {
        return $this->get( "Email" );
    }

    /**
     * Sets the update value for the field 'Email'.
     *
     * @exception InvalidArgumentException
     * @param string $strEmail
     * @param boolean $boolupdate
     */
    public function setEmail ( $strEmail, $boolUpdate = false ) {
        if ( Core_String::isEmail( $strEmail ) ) {
            $this->strEmailUpdate = $strEmail;
            if ( $boolUpdate ) {
                $this->Model->update( $this );
            }
        } else {
            throw new InvalidArgumentException( "\$strEmail holds '$strEmail' and is not a valid email.", 0 );
        }
    }

    public function getUpdateValues () {
        
    }

}

?>
